<template>
    <div class="">
        <el-dialog
                :title="title"
                :visible.sync="dialogFormVisible"
                width="55%"
                :close-on-click-modal="false"
                @close="close"
        >
          <div class="">
            <el-form ref="form" :model="form" label-width="120px">
              <div class="flex-bet flex-y-top">
                <div class="bflex-4">
                  <div class="shuju_title">
                    <div class="shuju_title_text">
                      <span>订单信息</span>
                    </div>
                  </div>
                  <div class="formBox">
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">订单类型：</div>
                      <div>
                        <span><el-tag size="mini" type="success">评价详情</el-tag></span>
                      </div>
                    </div>
<!--                    <div class="flex pad_lr_10 bor_b_df5 lh40">-->
<!--                      <div class="seeLeft">订单ID：{{orderDetail.id}}</div>-->
<!--                      <div></div>-->
<!--                    </div>-->
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">提交时间：</div>
                      <div>{{ orderDetail.createdAt }}</div>
                    </div>
<!--                    <div class="flex pad_lr_10 bor_b_df5 lh40">-->
<!--                      <div class="seeLeft">订单渠道：</div>-->
<!--                      <div>-->
<!--                        <span v-if="orderDetail.origin=='1'"><el-tag size="mini" type="success">微信小程序</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='2'"><el-tag size="mini" type="success">微信公众号</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='3'"><el-tag size="mini" type="success">支付宝小程序</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='4'"><el-tag size="mini" type="success">百度小程序</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='5'"><el-tag size="mini" type="success">H5</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='6'"><el-tag size="mini" type="success">PC</el-tag></span>-->
<!--                        <span v-if="orderDetail.origin=='7'"><el-tag size="mini" type="success">头条小程序</el-tag></span>-->
<!--                      </div>-->
<!--                    </div>-->
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">用户信息：</div>
                      <div>{{ orderDetail.userName }}（UID：{{ orderDetail.id }}）</div>
                    </div>
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">订单状态：</div>
                      <div class="flex flex-center">
                        <div>
                          <div v-if="orderDetail.state=='1'"><el-tag size="mini">待审核</el-tag></div>
                          <div v-if="orderDetail.state=='2'"><el-tag size="mini" type="success">已通过</el-tag></div>
                          <div v-if="orderDetail.state=='3'"><el-tag size="mini" type="danger">已拒绝</el-tag></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="bflex-6 mar_l20">
                  <div class="shuju_title">
                    <div class="shuju_title_text">
                      <span>评价详情</span>
                    </div>
                  </div>
                  <div class="formBox">
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">评分：</div>
                      <div>
                        <el-rate
                          v-model.number="orderDetail.star"
                          disabled
                          show-score
                          text-color="#ff9900"
                          score-template="{value}">
                      </el-rate></div>
                    </div>
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">评价内容：</div>
                      <div class="flex">{{orderDetail.body}}</div>
                    </div>
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">评价图片：</div>
                      <div class="flex">
                        <div v-if="orderDetail.media" class="flex mar_t10">
                          <div v-for="(item,i) in orderDetail.media" :key="i">
                            <img class="goodlogo bor_rad5" :src="item" />
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="flex pad_lr_10 bor_b_df5 lh40">
                      <div class="seeLeft">商家回复：{{orderDetail.reply}}</div>
                      <div></div>
                    </div>
                  </div>
                </div>
              </div>
            </el-form>
          </div>
            <div slot="footer" class="dialog-footer">
                <el-button size="medium" @click="close">取 消</el-button>
                <el-button size="medium" type="primary" @click="save">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: "goodlistedit",
        created() {
        },
        data() {
            return {
                form: {
                    id:'',
                    sort: "1",
                    name: "",
                    min: "",
                    max: "",
                    minute: "",
                },
                orderDetail: {},
                title: "",
                type: 1,
                dialogFormVisible: false,
                qjjl:[],
                qjjl2:[],
            }
        },
        components: {
        },
        methods: {
            async showEdit(row) {
                if (!row) {
                    this.title = "评价详情";
                } else {
                    this.title = "评价详情";
                  // this.form = data
                    this.orderDetail = Object.assign({}, row);
                }
                this.dialogFormVisible = true;
            },
            close() {
                this.dialogFormVisible = false;
            },
            setStoreId(storeId){
              this.form.storeId = storeId
            },
            save() {
              this.dialogFormVisible = false;
            },
        }
    };
</script>
